package com.prs.crm.domain.oa;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Dept;

/**
 * OA综合行政车辆
 * @author zhoupeng 2012-4-13
 *
 */
@Entity
@Table(name="oa_Vehicle")
public class Vehicle extends BaseEntity{
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	/**
	 * 车辆所属
	 */
	@ManyToOne
	private Dept dept;
	/**
	 * 车牌号
	 */
	private String code;
	/**
	 * 大架号
	 */
	private String bigCode;
	/**
	 * 发动机号
	 */
	private String engineCode;
	/**
	 * 品牌
	 */
	private String brand;
	/**
	 * 购买价格
	 */
	private String price;
	/**
	 * 型号
	 */
	private String model;
	/**
	 * 颜色
	 */
	private String color;
	/**
	 * 购买日期
	 */
	private Date buyTime;
	/**
	 * 车辆照片
	 */
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach;
	@Column(name="vehicle_file")
	private String vehicle_file;
	/**
	 * 驾驶员
	 */
	private String driver;
	/**
	 * 驾驶员手机
	 */
	private String driverPhone;
	/**
	 * 备注
	 */
	private String remark;
	/**
	 * 状态
	 */
	private String state;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Dept getDept() {
		return dept;
	}
	public void setDept(Dept dept) {
		this.dept = dept;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getBigCode() {
		return bigCode;
	}
	public void setBigCode(String bigCode) {
		this.bigCode = bigCode;
	}
	public String getEngineCode() {
		return engineCode;
	}
	public void setEngineCode(String engineCode) {
		this.engineCode = engineCode;
	}
	public String getBrand() {
		return brand;
	}
	public void setBrand(String brand) {
		this.brand = brand;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
	public String getColor() {
		return color;
	}
	public void setColor(String color) {
		this.color = color;
	}
	public Date getBuyTime() {
		return buyTime;
	}
	public void setBuyTime(Date buyTime) {
		this.buyTime = buyTime;
	}
	public Attachment getAttach() {
		return attach;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	public String getDriver() {
		return driver;
	}
	public void setDriver(String driver) {
		this.driver = driver;
	}
	public String getDriverPhone() {
		return driverPhone;
	}
	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getVehicle_file() {
		return vehicle_file;
	}
	public void setVehicle_file(String vehicleFile) {
		vehicle_file = vehicleFile;
	}
	
}
